import {get} from 'api/http'

const loadData=()=>{
  return async (dispatch) => {
    let rs = await get(`/api/data`)
    // console.log(rs.data.data)
      dispatch({ type: "list",data:rs.data.data})
  }
}
const succulentData=()=>{
  return async (dispatch) => {
    let res = await get(`/api/succulent`)
    // console.log(res.data.data)
      dispatch({ type: "succulent",succulentData:res.data.data})
  }
}


export {
  loadData,
  succulentData
}